package com.gun3y.entity.htmlparser;

import org.htmlparser.tags.CompositeTag;

public class CustomizedTag extends CompositeTag {

    private static final long serialVersionUID = 2498218429069959129L;

    /**
     * The set of names handled by this tag.
     */
    private String[] mIds = new String[0];

    /**
     * The set of end tag names that indicate the end of this tag.
     */
    private String[] mEndTagEnders = new String[] { "BODY", "HTML" };

    public CustomizedTag(String tagName) {
	super();
	mIds = new String[] { tagName };
    }

    public CustomizedTag(String tagName, String... tagEnders) {
	super();
	mIds = new String[] { tagName };
	mEndTagEnders = tagEnders;
    }

    /**
     * Return the set of names handled by this tag.
     * 
     * @return The names to be matched that create tags of this type.
     */
    public String[] getIds() {
	return extractedmIds();
    }

    private String[] extractedmIds() {
	return mIds;
    }

    /**
     * Return the set of end tag names that cause this tag to finish.
     * 
     * @return The names of following end tags that stop further scanning.
     */
    public String[] getEndTagEnders() {
	return extractedmEndTagEnders();
    }

    private String[] extractedmEndTagEnders() {
	return mEndTagEnders;
    }

}
